package ch.exploadingelephants.graph;

import java.util.List;

import ch.exploadingelephants.model.ConveyorDirection;

/**
 * @author Sandro De Zanet
 * 
 */
public class NirvanaToken extends Token {

    /*
     * (non-Javadoc)
     * 
     * @see
     * ch.exploadingelephants.graph.Token#accept(ch.exploadingelephants.graph
     * .DotString)
     */
    @Override
    public TokenResult accept(DotString inputPattern,
	    List<VisitedNodeState> visited) throws InfinityLoopException {
	checkForInfiniteLoop(inputPattern, visited);
	return new TokenResult(false, inputPattern.copy());
    }

    /*
     * (non-Javadoc)
     * 
     * @see
     * ch.exploadingelephants.graph.Token#tryConnect(ch.exploadingelephants.
     * graph.Token, ch.exploadingelephants.model.ConveyorDirection)
     */
    @Override
    public boolean tryConnect(Token createGraphObject, ConveyorDirection west) {
	return false;
    }

    /**
     * 
     */
    @Override
    public String toString() {
	return "Nirvana";
    }

}
